<?php
namespace fack;

use servers\AliPayServer;

class Pay
{
    const WEIXPAY = 'weixpay';
    const ALIPAY = 'alipay';
    const YUEPAY = 'yuepay';

    public static function payType($type)
    {

        switch ($type){
            case self::ALIPAY : $pay = new AliPayServer(); break;
            case self::WEIXPAY : $pay = new AliPayServer(); break;
            case self::YUEPAY : $pay = new AliPayServer(); break;
            default : return null;
        }

        return $pay;
    }
}